import request from '@/utils/request'

// 菜单修改
export function editMenus(data) {
  return request({
    url: `/menus/${data.id}`,
    method: 'put',
    data
  })
}

// 菜单列表
export function menusList() {
  return request({
    url: `/menus`,
    method: 'get'
  })
}

// 菜单删除
export function delMenus(id) {
  return request({
    url: `/menus/${id}`,
    method: 'DELETE'
  })
}

// 菜单添加
export function addMenus(data) {
  return request({
    url: `/menus`,
    method: 'post',
    data
  })
}

// 菜单详情
export function detailMenus(id) {
  return request({
    url: `/menus/${id}`,
    method: 'get'
  })
}

